package wh.神奇的礼物;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2022/12/22 9:48
 * @description:
 * @version:
 */
public class Solution {
    public static void main(String[] args) {
        int[] nums = {1,2,1};
        int target = 2;
        if (target == 1){
            if ((nums[2]-nums[1])%3 == 0 && (Math.abs(nums[2]-nums[1])/3) <= nums[0]){
                System.out.println(true);
            }else {
                System.out.println(false);
            }
        }else if  (target == 2){
            if ((nums[2]-nums[0])%3 == 0 && (Math.abs(nums[2]-nums[0])/3) <= nums[1]){
                System.out.println(true);
            }else {
                System.out.println(false);
            }
        }else if (target == 3){
            if ((nums[1]-nums[0])%3 == 0 && (Math.abs(nums[1]-nums[0])/3) <= nums[2]){
                System.out.println(true);
            }else {
                System.out.println(false);
            }
        }
    }
}
